package domain.extendMappingTablePerClass;

import javax.persistence.*;

@Entity
@Table(name = "customer_inf")
public class Customer extends Person{
    private String comment;
    @ManyToOne(targetEntity = Employee.class,cascade = CascadeType.ALL)
    @JoinColumn(name = "employee_id")
    private Employee employee;

    public Customer() {
    }

    public Customer(String name, String comment) {
        super(name);
        this.comment = comment;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Employee getEmployee() {
        return employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }
}
